﻿
namespace DataAccessLayer
{
    public sealed class WeaponFactory : WeaponFactoryBase
    {
        public override NormalWeapon ConstructNormalWeapon(int requireSlots, int bulletCount, int shootInterval)
        {
            return new NormalWeapon
                       {
                           RequiredSlots = requireSlots,
                           BulletCount = bulletCount,
                           ShootInterval = shootInterval
                       };
        }

        public override RapidFireWeapon ConstructRapidFireWeapon(int requireSlots, int bulletCount, int shootInterval)
        {
            return new RapidFireWeapon
            {
                RequiredSlots = requireSlots,
                BulletCount = bulletCount,
                ShootInterval = shootInterval
            };
        }

        public override IntenseFireWeapon ConstructIntenseFireWeapon(int requireSlots, int bulletCount, int shootInterval)
        {
            return new IntenseFireWeapon
            {
                RequiredSlots = requireSlots,
                BulletCount = bulletCount,
                ShootInterval = shootInterval
            };
        }

        public override FullAutomaticWeapon ConstructFullAutomaticWeapon(int requireSlots, int bulletCount, int shootInterval)
        {
            return new FullAutomaticWeapon
            {
                RequiredSlots = requireSlots,
                BulletCount = bulletCount,
                ShootInterval = shootInterval
            };
        }

        public override SemiAutomaticWeapon ConstructSemiAutomaticWeapon(int requireSlots, int bulletCount, int shootInterval)
        {
            return new SemiAutomaticWeapon
            {
                RequiredSlots = requireSlots,
                BulletCount = bulletCount,
                ShootInterval = shootInterval
            };
        }
    }
}